package com.bifang.module.file.dao.model;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.util.Date;
import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * 文件信息表
 *
 * @author chenzh
 * @since 2021-01-27
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("FILE_INFO")
@Schema(title ="FileInfo对象", description = "文件信息表")
// @KeySequence(value = "SQ_FILE_ID", clazz = Long.class)
public class FileInfo extends Model<FileInfo> {

    private static final long serialVersionUID = 1L;

    @Schema(title = "文件id")
    @TableId(value = "FILE_ID", type = IdType.ASSIGN_ID)
    private BigDecimal fileId;

    @TableField("SHOW_ID")
    private String showId;

    @Schema(title = "文件分类")
    @TableField("FILE_CLASS_CODE")
    private String fileClassCode;

    @Schema(title = "文件名称")
    @TableField("FILE_NAME")
    private String fileName;

    @Schema(title = "文件后缀（文件类型）")
    @TableField("FILE_SUFFIX")
    private String fileSuffix;

    @Schema(title = "文件环境主键")
    @TableField("FILE_ENV_ID")
    private Long fileEnvId;

    @Schema(title = "文件存放路径")
    @TableField("FILE_PATH")
    private String filePath;

    @Schema(title = "文件大小")
    @TableField("FILE_SIZE")
    private Long fileSize;

    @Schema(title = "公司id")
    @TableField("ORG_ID")
    private String orgId;

    @Schema(title = "是否加密，0 否 1 是")
    @TableField("ENCRYPTION_FLAG")
    private String encryptionFlag;

    @Schema(title = "文件加密密码")
    @TableField("FILE_PASSOWRD")
    private String filePassowrd;

    @Schema(title = "压缩包解压密码")
    @TableField("ZIP_PASSWORD")
    private String zipPassword;

    @Schema(title = "是否归档 0 否 1是")
    @TableField("FIELDER_FLAG")
    private String fielderFlag;

    @Schema(title = "上传应用id")
    @TableField("UP_APP_ID")
    private Long upAppId;

    @Schema(title = "上传人")
    @TableField("UPLOADER")
    private String uploader;

    @Schema(title = "上传人id")
    @TableField("UPLOADER_ID")
    private String uploaderId;

    @Schema(title = "上传时间")
    @TableField("UP_TIME")
    private Date upTime;

    @Schema(title = "归档人")
    @TableField("FILEDER")
    private String fileder;

    @Schema(title = "归档人id")
    @TableField("FILEDER_ID")
    private String filederId;

    @Schema(title = "归档时间")
    @TableField("FILEDER_TIME")
    private Date filederTime;

    @Schema(title = "备注")
    @TableField("REMARKS")
    private String remarks;

    @Schema(title = "文件md5 用于比对是否一致")
    @TableField("FILE_MD5")
    private String fileMd5;


    @Schema(title = "保密级别")
    @TableField("SECRECY_LEVEL")
    private String secrecyLevel;
    @Schema(title = "保存的表名")
    @TableField("table_name")
    private String tableName;
    @Override
    public Serializable pkVal() {
        return this.fileId;
    }
}
